﻿using System;
using TMT_CMS.BL.Excel.AttributeUtility;

namespace TMT_CMS.BL.Excel.Entity
{
    public class CityInfo
    {
        private short _ID = -1;
        private string _Abbr = string.Empty;
        private string _ChineseName = string.Empty;
        private string _EnglishName = string.Empty;
        private short _ProvinceID = -1;
        private string _RussianName = string.Empty;

        [DataAttribute("ID", DataType.ShortInt, "编号")]
        public short ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        [DataAttribute("Abbr", DataType.String, "城市编码")]
        public string Abbr
        {
            get { return _Abbr; }
            set { _Abbr = value; }
        }

        [DataAttribute("ChineseName", DataType.String, "中文名字")]
        public string ChineseName
        {
            get { return _ChineseName; }
            set { _ChineseName = value; }
        }

        [DataAttribute("EnglishName", DataType.String, "英文名字")]
        public string EnglishName
        {
            get { return _EnglishName; }
            set { _EnglishName = value; }
        }

        [DataAttribute("ProvinceID", DataType.ShortInt, "省份编号")]
        public short ProvinceID
        {
            get { return _ProvinceID; }
            set { _ProvinceID = value; }
        }

        public ProvinceInfo Province { get; set; }
        public string ProvinceName
        {
            get
            {
                if (Province != null)
                {
                    return Province.ChineseName;
                }
                else
                {
                    return string.Empty;
                }
            }
        }

        [DataAttribute("RussianName", DataType.String, "俄文名字")]
        public string RussianName
        {
            get { return _RussianName; }
            set { _RussianName = value; }
        }
    }
}
